package com.lhb.SC.admin.feign.codec;

import feign.RequestTemplate;
import feign.codec.EncodeException;
import feign.codec.Encoder;
import lombok.extern.slf4j.Slf4j;

import java.lang.reflect.Type;

@Slf4j
public class MonitorEncoder implements Encoder {

    private Encoder delegate;

    public MonitorEncoder(Encoder delegate) {
        log.info("MonitorEncoder.start.......................");
        log.info("MonitorEncoder.delegate={}", delegate);
        this.delegate = delegate;
    }

    @Override
    public void encode(Object object, Type bodyType, RequestTemplate template) throws EncodeException {
        delegate.encode(object,bodyType,template);
    }
}
